# coding:utf8
"""

"""

import psutil

# ----- 基本参数 -----
PROCESS_NAME = 'Thunder'


class DataStatistics:
    def __init__(self, process_name):
        self.process_name = process_name
        self.pid = self.get_pid()

    def get_pid(self):
        _pid = []
        pids = psutil.pids()
        for pid in pids:
            p = psutil.Process(pid)
            if p.name().startswith(self.process_name): _pid.append(pid)
        return _pid

    def get_port(self):
        _port = []

